For normal indexing, if the resulting index is outside the list, Python raises an IndexError exception. ... # push object = queue.pop(0) # pop from beginning The list type isn’t optimized for this, so this works best when the structures are small (typical